//-----------------------------------------------------------------------------
// Torque Game Engine 
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

datablock ItemData(Key)
{
   // Mission editor category, this datablock will show up in the
   // specified category under the "shapes" root category.
   category = "Keys";

   // Basic Item properties
   shapeFile = "~/data/shapes/floppy_disk/red_disk.dts";
   mass = 1;
   friction = 1;
   elasticity = 0.3;
   emap = true;
   
   // Dynamic properties defined by the scripts
   pickUpName = "key";
   maxInventory = 1;
};



datablock ItemData(Weapon_Key : Key)
{
	category = "Keys";
	pickUpName = "weapons locker key";
	shapeFile = "~/data/shapes/floppy_disk/blue_disk.dts";
};

function Weapon_Key::onPickup(%this, %obj, %client, %amount)
{
	bottomPrint( %client.client, "Now I can access the weapon locker computers", 4);
	// Display the blue GUI key item
	blue.setVisible(true);
	// Call onPickup for parent to take care of inventory stuff
	return Parent::onPickup(%this, %obj, %client, %amount);
}



datablock ItemData(Bridge_Access_Key : Key)
{
	category = "Keys";
	pickUpName = "bridge access key";
	shapeFile = "~/data/shapes/floppy_disk/yellow_disk.dts";
};

function Bridge_Access_Key::onPickup(%this, %obj, %client, %amount)
{
	bottomPrint( %client.client, "Now I can gain access to the ship's bridge", 4);
	// Display the yellow GUI key item
	yellow.setVisible(true);
	// Call onPickup for parent to take care of inventory stuff
	return Parent::onPickup(%this, %obj, %client, %amount);
}



datablock ItemData(Bridge_Computer_Key : Key)
{
	category = "Keys";
	pickUpName = "bridge computer key";
	shapeFile = "~/data/shapes/floppy_disk/red_disk.dts";
};

function Bridge_Computer_Key::onPickup(%this, %obj, %client, %amount)
{
	bottomPrint( %client.client, "Now I can access the bridge computer", 4);
	// Display the red GUI key item
	red.setVisible(true);
	// Call onPickup for parent to take care of inventory stuff
	return Parent::onPickup(%this, %obj, %client, %amount);
}